package cn.edu.hy.demo07.controller;

import cn.edu.hy.demo07.entity.Country;
import cn.edu.hy.demo07.service.CountryService;
import com.github.monee1988.mybatis.entity.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("country")
public class CountryController {

    @Autowired
    private CountryService countryService;

    @RequestMapping(value = "findPage")
    public ModelAndView index(ModelMap modelMap, Page<Country> page,Country country){

        modelMap.put("page",countryService.findPageList(country,page));

        return new ModelAndView("demo07/list");



    }
}
